home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
UUPC11QS.ARJ
/
PRINTERR.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-11-21
|
3KB
|
65 lines
/*--------------------------------------------------------------------*/
/* p r i n t e r r . c */
/* */
/* Support routines for UUPC/extended */
/* */
/* Changes Copyright 1990, 1991 (c) Andrew H. Derbyshire */
/* */
/* History: */
/* 21Nov1991 Break out of lib.c ahd */
/*--------------------------------------------------------------------*/
#include <dos.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
/*--------------------------------------------------------------------*/
/* UUPC/extended include files */
/*--------------------------------------------------------------------*/
#include "lib.h"
/*--------------------------------------------------------------------*/
/* p r i n t e r r */
/* */
/* Perform a perror() with logging */
/*--------------------------------------------------------------------*/
void prterror(const size_t lineno, const char *fname, const char *prefix)
{
printmsg(0,"File %s(%d) %s: %s",
fname, lineno, prefix, strerror(errno));
#ifdef __TURBOC__
if (_osmajor >= 3 )
{
union REGS regs;
struct SREGS sregs;
regs.h.ah = 0x59; /* Extended error information */
regs.x.bx = 0x00; /* Set up for call */
intdosx(®s, ®s, &sregs);
printmsg(0,"Extended Error Information: "
"Number = %d, Class = %d, Action = %d, Locus = %d",
(int) regs.x.ax, (int) regs.h.bh,
(int) regs.h.bl, (int) regs.h.ch );
/*--------------------------------------------------------------------*/
/* Abort if that is the suggested action */
/*--------------------------------------------------------------------*/
switch( regs.h.bl )
{
case 0x04:
case 0x05:
bugout( lineno, fname);
default:
break;
} /* switch */
} /* (_osmajor >= 3 ) */
#endif
} /* printerr */